﻿const prefix = '/admin';

export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user',
        routes: [
          {
            name: 'login',
            path: '/user/login',
            component: './User/login',
          },
        ],
      },
    ],
  },
  {
    path: prefix,
    layout: false,
    component: '@/layouts/nested',
    routes: [
      {
        cname: '总览',
        name: 'welcome',
        path: prefix + '/welcome',
        local: 'menu.welcome',
        icon: 'HomeOutlined',
        routes: [
          {
            cname: '首页',
            name: 'welcome',
            path: prefix + '/welcome/home',
            local: 'menu.welcome.welcome',
            component: '@/pages/welcome/home',
          },
          {
            cname: '代码生成',
            name: 'code',
            path: prefix + '/welcome/code',
            local: 'menu.welcome.code',
            component: '@/pages/welcome/code',
          },
        ],
      },

      {
        cname: '商品',
        name: 'goods',
        path: prefix + '/goods',
        local: 'menu.goods',
        icon: 'SketchOutlined',
        routes: [
          {
            cname: '分类管理',
            name: 'class',
            path: prefix + '/goods/class',
            local: 'menu.goods.class',
            component: '@/pages/NewPage',
          },
          {
            cname: '品牌管理',
            name: 'brand',
            path: prefix + '/goods/brand',
            local: 'menu.goods.brand',
            component: '@/pages/NewPage',
          },
          {
            cname: '商品总览',
            name: 'list',
            path: prefix + '/goods/list',
            local: 'menu.goods.list',
            component: '@/pages/NewPage',
          },
          {
            cname: '类型管理',
            name: 'type',
            path: prefix + '/goods/type',
            local: 'menu.goods.type',
            component: '@/pages/NewPage',
          },
          {
            cname: '规格管理',
            name: 'spec',
            path: prefix + '/goods/spec',
            local: 'menu.goods.spec',
            component: '@/pages/NewPage',
          },
          {
            cname: '图片空间',
            name: 'image',
            path: prefix + '/goods/image',
            local: 'menu.goods.image',
            component: '@/pages/NewPage',
          },
        ],
      },

      {
        cname: '内容',
        name: 'website',
        path: prefix + '/website',
        local: 'menu.website',
        icon: 'ProfileOutlined',
        routes: [
          {
            cname: '文章分类',
            name: 'articleClass',
            path: prefix + '/website/articleClass',
            local: 'menu.website.articleClass',
            component: '@/pages/NewPage',
          },
          {
            cname: '文章管理',
            name: 'article',
            path: prefix + '/website/article',
            local: 'menu.website.article',
            component: '@/pages/NewPage',
          },
          {
            cname: '会员协议',
            name: 'agreement',
            path: prefix + '/website/agreement',
            local: 'menu.website.agreement',
            component: '@/pages/NewPage',
          },
          {
            cname: '导航管理',
            name: 'navigation',
            path: prefix + '/website/navigation',
            local: 'menu.website.navigation',
            component: '@/pages/NewPage',
          },
          {
            cname: '广告管理',
            name: 'adv',
            path: prefix + '/website/adv',
            local: 'menu.website.adv',
            component: '@/pages/NewPage',
          },
          {
            cname: '首页管理',
            name: 'homepage',
            path: prefix + '/website/homepage',
            local: 'menu.website.homepage',
            component: '@/pages/NewPage',
          },
          {
            cname: '推荐位',
            name: 'recPosition',
            path: prefix + '/website/recPosition',
            local: 'menu.website.recPosition',
            component: '@/pages/NewPage',
          },
          {
            cname: '商品推荐',
            name: 'recommend',
            path: prefix + '/website/recommend',
            local: 'menu.website.recommend',
            component: '@/pages/NewPage',
          },
          {
            cname: '专题管理',
            name: 'special',
            path: prefix + '/website/special',
            local: 'menu.website.special',
            component: '@/pages/NewPage',
          },
        ],
      },

      {
        cname: '运营',
        name: 'operation',
        path: prefix + '/operation',
        icon: 'AccountBookOutlined',
        local: 'menu.operation',
        routes: [
          {
            cname: '基本设置',
            name: 'set',
            path: prefix + '/operation/set',
            local: 'menu.operation.set',
            component: '@/pages/NewPage',
          },
          {
            cname: '抢购管理',
            name: 'groupbuy',
            path: prefix + '/operation/groupbuy',
            local: 'menu.operation.groupbuy',
            component: '@/pages/NewPage',
          },
          {
            cname: '虚拟抢购',
            name: 'vrGroupbuy',
            path: prefix + '/operation/vrGroupbuy',
            local: 'menu.operation.vrGroupbuy',
            component: '@/pages/NewPage',
          },
          {
            cname: '活动管理',
            name: 'activity',
            path: prefix + '/operation/activity',
            local: 'menu.operation.activity',
            component: '@/pages/NewPage',
          },
          {
            cname: '折扣管理',
            name: 'zk',
            path: prefix + '/operation/zk',
            local: 'menu.operation.zk',
            component: '@/pages/NewPage',
          },
          {
            cname: '满赠管理',
            name: 'mz',
            path: prefix + '/operation/mz',
            local: 'menu.operation.mz',
            component: '@/pages/NewPage',
          },
          {
            cname: '优惠套装',
            name: 'bundling',
            path: prefix + '/operation/bundling',
            local: 'menu.operation.bundling',
            component: '@/pages/NewPage',
          },
          {
            cname: '推荐展位',
            name: 'showArea',
            path: prefix + '/operation/showArea',
            local: 'menu.operation.showArea',
            component: '@/pages/NewPage',
          },
          {
            cname: '积分兑换',
            name: 'points',
            path: prefix + '/operation/points',
            local: 'menu.operation.points',
            component: '@/pages/NewPage',
          },
          {
            cname: '红包管理',
            name: 'redPacket',
            path: prefix + '/operation/redPacket',
            local: 'menu.operation.redPacket',
            component: '@/pages/NewPage',
          },
          {
            cname: '代金券',
            name: 'voucher',
            path: prefix + '/operation/voucher',
            local: 'menu.operation.voucher',
            component: '@/pages/NewPage',
          },
          {
            cname: '结算管理',
            name: 'bill',
            path: prefix + '/operation/bill',
            local: 'menu.operation.bill',
            component: '@/pages/NewPage',
          },
          {
            cname: '虚拟订单结算',
            name: 'vrBill',
            path: prefix + '/operation/vrBill',
            local: 'menu.operation.vrBill',
            component: '@/pages/NewPage',
          },
          {
            cname: '网站客服',
            name: 'customerService',
            path: prefix + '/operation/customerService',
            local: 'menu.operation.customerService',
            component: '@/pages/NewPage',
          },
          {
            cname: '充值卡',
            name: 'rechargeCard',
            path: prefix + '/operation/rechargeCard',
            local: 'menu.operation.rechargeCard',
            component: '@/pages/NewPage',
          },
          {
            cname: '物流自提服务站',
            name: 'delivery',
            path: prefix + '/operation/delivery',
            local: 'menu.operation.delivery',
            component: '@/pages/NewPage',
          },
        ],
      },
      {
        cname: '交易',
        name: 'trade',
        path: prefix + '/trade',
        icon: 'TransactionOutlined',
        local: 'menu.trade',
        routes: [
          {
            cname: '实物订单',
            name: 'order',
            path: prefix + '/trade/order',
            local: 'menu.trade.order',
            component: '@/pages/NewPage',
          },
          {
            cname: '虚拟订单',
            name: 'vrOrder',
            path: prefix + '/trade/vrOrder',
            local: 'menu.trade.vrOrder',
            component: '@/pages/NewPage',
          },
          {
            cname: '退款管理',
            name: 'refund',
            path: prefix + '/trade/refund',
            local: 'menu.trade.refund',
            component: '@/pages/NewPage',
          },
          {
            cname: '退货管理',
            name: 'return',
            path: prefix + '/trade/return',
            local: 'menu.trade.return',
            component: '@/pages/NewPage',
          },
          {
            cname: '虚拟订单退款',
            name: 'vrRefund',
            path: prefix + '/trade/vrRefund',
            local: 'menu.trade.vrRefund',
            component: '@/pages/NewPage',
          },
          {
            cname: '咨询管理',
            name: 'consult',
            path: prefix + '/trade/consult',
            local: 'menu.trade.consult',
            component: '@/pages/NewPage',
          },
          {
            cname: '举报管理',
            name: 'inform',
            path: prefix + '/trade/inform',
            local: 'menu.trade.inform',
            component: '@/pages/NewPage',
          },
          {
            cname: '评价管理',
            name: 'evaluate',
            path: prefix + '/trade/evaluate',
            local: 'menu.trade.evaluate',
            component: '@/pages/NewPage',
          },
          {
            cname: '投诉管理',
            name: 'complain',
            path: prefix + '/trade/complain',
            local: 'menu.trade.complain',
            component: '@/pages/NewPage',
          },
        ],
      },
      {
        cname: '会员',
        name: 'member',
        path: prefix + '/member',
        icon: 'UserOutlined',
        local: 'menu.member',
        routes: [
          {
            cname: '会员总览',
            name: 'list',
            path: prefix + '/member/list',
            local: 'menu.member.list',
            component: '@/pages/NewPage',
          },
          {
            cname: '会员级别',
            name: 'grade',
            path: prefix + '/member/grade',
            local: 'menu.member.grade',
            component: '@/pages/NewPage',
          },
          {
            cname: '经验值管理',
            name: 'experience',
            path: prefix + '/member/experience',
            local: 'menu.member.experience',
            component: '@/pages/NewPage',
          },
          {
            cname: '会员通知',
            name: 'sendMessage',
            path: prefix + '/member/sendMessage',
            local: 'menu.member.sendMessage',
            component: '@/pages/NewPage',
          },
          {
            cname: '积分管理',
            name: 'points',
            path: prefix + '/member/points',
            local: 'menu.member.points',
            component: '@/pages/NewPage',
          },
          {
            cname: '预存款',
            name: 'prepaid',
            path: prefix + '/member/prepaid',
            local: 'menu.member.prepaid',
            component: '@/pages/NewPage',
          },
          {
            cname: '聊天记录',
            name: 'chatLog',
            path: prefix + '/member/chatLog',
            local: 'menu.member.chatLog',
            component: '@/pages/NewPage',
          },
        ],
      },

      {
        cname: '店铺',
        name: 'store',
        path: prefix + '/store',
        icon: 'ShopOutlined',
        local: 'menu.store',
        routes: [
          {
            cname: '店铺总览',
            name: 'list',
            path: prefix + '/store/list',
            local: 'menu.store.list',
            component: '@/pages/NewPage',
          },
          {
            cname: '店铺等级',
            name: 'grade',
            path: prefix + '/store/grade',
            local: 'menu.store.grade',
            component: '@/pages/NewPage',
          },
          {
            cname: '店铺分类',
            name: 'class',
            path: prefix + '/store/class',
            local: 'menu.store.class',
            component: '@/pages/NewPage',
          },
          {
            cname: '店铺帮助',
            name: 'help',
            path: prefix + '/store/help',
            local: 'menu.store.help',
            component: '@/pages/NewPage',
          },
          {
            cname: '开店首页',
            name: 'joinin',
            path: prefix + '/store/joinin',
            local: 'menu.store.joinin',
            component: '@/pages/NewPage',
          },
          {
            cname: '自营店铺',
            name: 'selfSupport',
            path: prefix + '/store/selfSupport',
            local: 'menu.store.selfSupport',
            component: '@/pages/NewPage',
          },
        ],
      },

      {
        cname: '风控',
        name: 'risk',
        path: prefix + '/risk',
        icon: 'PropertySafetyOutlined',
        local: 'menu.risk',
        routes: [
          {
            cname: '订单异常',
            name: 'alertOrder',
            path: prefix + '/risk/alertOrder',
            local: 'menu.risk.alertOrder',
            component: '@/pages/NewPage',
          },
          {
            cname: '访问日志',
            name: 'actionLog',
            path: prefix + '/risk/actionLog',
            local: 'menu.risk.actionLog',
            component: '@/pages/NewPage',
          },
        ],
      },
      {
        cname: '统计',
        name: 'dashboard',
        path: prefix + '/dashboard',
        local: 'menu.dashboard',
        icon: 'LineChartOutlined',
        routes: [
          {
            cname: '概述及设置',
            name: 'summarize',
            path: prefix + '/dashboard/summarize',
            local: 'menu.dashboard.summarize',
            component: '@/pages/dashboard/summarize',
          },
          {
            cname: '行业分析',
            name: 'industry',
            path: prefix + '/dashboard/industry',
            local: 'menu.dashboard.industry',
            component: '@/pages/NewPage',
          },
          {
            cname: '会员统计',
            name: 'member',
            path: prefix + '/dashboard/member',
            local: 'menu.dashboard.member',
            component: '@/pages/NewPage',
          },
          {
            cname: '店铺统计',
            name: 'store',
            path: prefix + '/dashboard/store',
            local: 'menu.dashboard.store',
            component: '@/pages/NewPage',
          },
          {
            cname: '销量分析',
            name: 'trade',
            path: prefix + '/dashboard/trade',
            local: 'menu.dashboard.trade',
            component: '@/pages/NewPage',
          },
          {
            cname: '商品分析',
            name: 'goods',
            path: prefix + '/dashboard/goods',
            local: 'menu.dashboard.goods',
            component: '@/pages/NewPage',
          },
          {
            cname: '营销分析',
            name: 'marketing',
            path: prefix + '/dashboard/marketing',
            local: 'menu.dashboard.marketing',
            component: '@/pages/NewPage',
          },
          {
            cname: '售后分析',
            name: 'aftersale',
            path: prefix + '/dashboard/aftersale',
            local: 'menu.dashboard.aftersale',
            component: '@/pages/NewPage',
          },
        ],
      },

      {
        cname: '设置',
        name: 'system',
        path: prefix + '/system',
        icon: 'SettingOutlined',
        local: 'menu.system',
        //redirect: prefix + '/system/baseinfo',
        routes: [
          {
            cname: '基本信息',
            name: 'baseinfo',
            path: prefix + '/system/baseinfo',
            local: 'menu.system.baseinfo',
            component: '@/pages/NewPage',
          },
          {
            cname: '合作账号',
            name: 'account',
            path: prefix + '/system/account',
            local: 'menu.system.account',
            component: '@/pages/NewPage',
          },
          {
            cname: '图片管理',
            name: 'uploadSetting',
            path: prefix + '/system/uploadSetting',
            local: 'menu.system.uploadSetting',
            component: '@/pages/NewPage',
          },
          {
            cname: 'SEO设置',
            name: 'seo',
            path: prefix + '/system/seo',
            local: 'menu.system.seo',
            component: '@/pages/NewPage',
          },
          {
            cname: '消息管理',
            name: 'message',
            path: prefix + '/system/message',
            local: 'menu.system.message',
            component: '@/pages/NewPage',
          },
          {
            cname: '支付方式',
            name: 'payment',
            path: prefix + '/system/payment',
            local: 'menu.system.payment',
            component: '@/pages/NewPage',
          },
          {
            cname: '权限管理',
            name: 'admin',
            path: prefix + '/system/admin',
            local: 'menu.system.admin',
            component: '@/pages/system/admin',
          },
          {
            cname: '物流公司',
            name: 'express',
            path: prefix + '/system/express',
            local: 'menu.system.express',
            component: '@/pages/NewPage',
          },
          {
            cname: '地区管理',
            name: 'area',
            path: prefix + '/system/area',
            local: 'menu.system.area',
            component: '@/pages/NewPage',
          },
          {
            cname: '货到付款地区',
            name: 'deliveryArea',
            path: prefix + '/system/deliveryArea',
            local: 'menu.system.deliveryArea',
            component: '@/pages/NewPage',
          },
          {
            cname: '运单模板',
            name: 'waybill',
            path: prefix + '/system/waybill',
            local: 'menu.system.waybill',
            component: '@/pages/NewPage',
          },
          {
            cname: '缓存清理',
            name: 'cache',
            path: prefix + '/system/cache',
            local: 'menu.system.cache',
            component: '@/pages/NewPage',
          },
          {
            cname: '搜索管理',
            name: 'search',
            path: prefix + '/system/search',
            local: 'menu.system.search',
            component: '@/pages/NewPage',
          },
          {
            cname: '查看日志',
            name: 'log',
            path: prefix + '/system/log',
            local: 'menu.system.log',
            component: '@/pages/NewPage',
          },
        ],
      },
      {
        cname: '移动端',
        name: 'mobile',
        path: prefix + '/mobile',
        icon: 'MobileOutlined',
        local: 'menu.mobile',
        routes: [
          {
            cname: '首页设置',
            name: 'homepage',
            path: prefix + '/mobile/homepage',
            local: 'menu.mobile.homepage',
            component: '@/pages/NewPage',
          },
          {
            cname: '微信快速登录',
            name: 'wechat',
            path: prefix + '/mobile/wechat',
            local: 'menu.mobile.wechat',
            component: '@/pages/NewPage',
          },
          {
            cname: '专题管理',
            name: 'special',
            path: prefix + '/mobile/special',
            local: 'menu.mobile.special',
            component: '@/pages/NewPage',
          },
          {
            cname: '下载设置',
            name: 'app',
            path: prefix + '/mobile/app',
            local: 'menu.mobile.app',
            component: '@/pages/NewPage',
          },
          {
            cname: '意见反馈',
            name: 'feedback',
            path: prefix + '/mobile/feedback',
            local: 'menu.mobile.feedback',
            component: '@/pages/NewPage',
          },
          {
            cname: '手机支付',
            name: 'payment',
            path: prefix + '/mobile/payment',
            local: 'menu.mobile.payment',
            component: '@/pages/NewPage',
          },
        ],
      },

      {
        component: './404',
        layout: false,
      },
    ],
  },

  {
    path: '/',
    redirect: prefix + '/welcome/home',
  },
  {
    component: './404',
  },
];
